package com.example.buyticketlishi.server;

import android.app.Service;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.IBinder;

import com.example.baselibrary.Utils.SelfToastUtil;
import com.example.buyticketlishi.view.ac.LoginActivity;

public class BOOTReceiver extends BroadcastReceiver {

    private String device_start_cation = "android.intent.action.BOOT_COMPLETED";
    public BOOTReceiver() {
    }

    @Override
    public void onReceive(Context context, Intent intent) {
        if (device_start_cation == intent.getAction()) {
//            SelfToastUtil.getInstance().show("需要开机自启动啦");
            Intent intentMainActivity = new Intent(context, LoginActivity.class);
            intentMainActivity.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            context.startActivity(intentMainActivity);
        }

    }


}
